{% extends "base.html" %}

{% block content %}
<div class="section">
    <div class="bar">
        <h3><label for="status" class="doing">Ordered List</label></h3>
    </div>
    <div id="results_update" class="minor-notification" style="display: none;"></div>
        <ol class="statuses" id="timeline">
        {% for o in orders %}
          {% for item in o.orderitem_set.all %}
            <li class="hentry">
            <span class="thumb"><a href="/cashier/{{ item.order.id }}"><img class="photo" src="/site_media/images/avartar.jpg" height="48" width="48"></a></span>
            <span class="status-body"><strong><a href="/cashier/{{ item.order.id }}" class="screen-name" title="">{{ item.icecream.name }}</a></strong>
                <span class="entry-content">with 
                    {% for scoop in item.scoops.all %} 
                    {% if forloop.last %} 
                    and {{ scoop }}.
                    {% else %}
                    {{ scoop }}, 
                    {% endif %}
                    {% endfor %}</span>
                    <span class="meta entry-meta"><span class="published">
                                {{ item.order.order_time|timesince }} ago
                    </span> <span>from Table {{ item.table.id }}</span>
                </span>

                <span class="actions"><div><a class="fav-action non-fav" title="favorite this item">&nbsp;&nbsp;</a><a class="reply" href="" title="cashier/{{ item.table.id }}">&nbsp;&nbsp;</a>
            </div></span>
            </li>
          {% endfor %}
        {% endfor %}
        </ol>
    </div>
</div>
{% endblock %}

{% block stat_orders %}{{ stat_orders }}{% endblock%}
{% block stat_customers %}{{ stat_customers }}{% endblock%}
{% block stat_incomes %}{{ stat_incomes }}{% endblock%}

{% block table_lists %}
<ul id="primary_nav" class="sidebar-menu">
    <li class="active"><a href="http://twitter.com/" accesskey="h" class="in-page-link"><span>Home</span></a></li>
    {% for table in table_lists %}
    <li><a href="/cashier/{{ table.id }}/" class="in-page-link"><span>Table {{ table }}</span></a></li>
    {% endfor %}
</ul>
{% endblock %}
